<?php

declare(ENCODING = 'UTF-8');

/*                                                                        *
 * This script is part of the TYPO3 project - inspiring people to share!  *
 *                                                                        *
 * TYPO3 is free software; you can redistribute it and/or modify it under *
 * the terms of the GNU General Public License version 2 as published by  *
 * the Free Software Foundation.                                          *
 *                                                                        *
 * This script is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *	
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
 * Public License for more details.                                       *
 *                                                                        */	

/**
 * @package auxo
 * @subpackage core
 * @version $Id$
 */

require_once(t3lib_extMgm::extPath('auxo') . 'core/class.tx_auxo_loader.php');
$loader = new tx_auxo_loader();

/**	
 * Testcases: Request
 *	
 * @package auxo
 * @subpackage core	
 * @version $Id$	
 * @copyright Copyright belongs to the respective authors
 * @author AHN
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
 */
class  tx_auxo_Request_testcase extends PHPUnit_Framework_testcase  {
	/**
	 * Sets up a test enviroment of this testcase.
	 */
	public function setUp() {
		$mockEnvironment = new tx_auxo_ExtensionEnvironment('auxo');
		$this->request = new tx_auxo_Request($mockEnvironment);
	}
	
	/**
	 * Testcase: Request is available 
	 * 
	 * @return void
	 */
	public function testRequestIsAvailable() {
		$this->assertType('tx_auxo_Request', $this->request);
	}

	/**
	 * Testcase: Accepted Content Types 
	 * 
	 * @return void
	 */
	public function testRequestGetContentTypes() {
		$this->assertType('tx_auxo_Request', $this->request);
		$this->assertNotEquals(0, count($this->request->getContentTypes()));
		$this->assertTrue(in_array('text/html', $this->request->getContentTypes()));
	}
	
	/**
	 * Tears down a created test enviroment of this testcase.
	 */
	public function tearDown() {
		unset($request);
		unset($mockEnvironment);		
	}
}